package com.ruoyi.wlxz.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wlxz.mapper.WxzSuggestMapper;
import com.ruoyi.wlxz.domain.WxzSuggest;
import com.ruoyi.wlxz.service.IWxzSuggestService;

/**
 * 建议箱Service业务层处理
 * 
 * @author zlh
 * @date 2025-05-13
 */
@Service
public class WxzSuggestServiceImpl implements IWxzSuggestService 
{
    @Autowired
    private WxzSuggestMapper wxzSuggestMapper;

    /**
     * 查询建议箱
     * 
     * @param id 建议箱主键
     * @return 建议箱
     */
    @Override
    public WxzSuggest selectWxzSuggestById(Long id)
    {
        return wxzSuggestMapper.selectWxzSuggestById(id);
    }

    /**
     * 查询建议箱列表
     * 
     * @param wxzSuggest 建议箱
     * @return 建议箱
     */
    @Override
    public List<WxzSuggest> selectWxzSuggestList(WxzSuggest wxzSuggest)
    {
        return wxzSuggestMapper.selectWxzSuggestList(wxzSuggest);
    }

    /**
     * 新增建议箱
     * 
     * @param wxzSuggest 建议箱
     * @return 结果
     */
    @Override
    public int insertWxzSuggest(WxzSuggest wxzSuggest)
    {
        wxzSuggest.setCreateTime(DateUtils.getNowDate());
        return wxzSuggestMapper.insertWxzSuggest(wxzSuggest);
    }

    /**
     * 修改建议箱
     * 
     * @param wxzSuggest 建议箱
     * @return 结果
     */
    @Override
    public int updateWxzSuggest(WxzSuggest wxzSuggest)
    {
        return wxzSuggestMapper.updateWxzSuggest(wxzSuggest);
    }

    /**
     * 批量删除建议箱
     * 
     * @param ids 需要删除的建议箱主键
     * @return 结果
     */
    @Override
    public int deleteWxzSuggestByIds(Long[] ids)
    {
        return wxzSuggestMapper.deleteWxzSuggestByIds(ids);
    }

    /**
     * 删除建议箱信息
     * 
     * @param id 建议箱主键
     * @return 结果
     */
    @Override
    public int deleteWxzSuggestById(Long id)
    {
        return wxzSuggestMapper.deleteWxzSuggestById(id);
    }
}
